package api

import (
	"github.com/gin-gonic/gin"
	"zg3zy9/api/handler"
	"zg3zy9/pkg"
)

func LoadRouter(router *gin.Engine) {
	router = gin.Default()

	v1 := router.Group("/v1")
	{
		v1.POST("/login", handler.Login)
	}

	v2 := router.Group("/v2")
	{
		v2.Use(pkg.JWTAuth("lx"))
		v2.GET("/wschat", handler.WsChat)
		v2.GET("/ws", handler.WsC)
	}
	router.Run(":8899")
}
